#include <iostream>
#include <vector>
using namespace std;

class Solution {
   public:
    vector<int> exchange(vector<int>& nums) {
        vector<int> v1;
        vector<int> v2;
        for (int n : nums) {
            if (n % 2 == 0) {
                v2.push_back(n);
            } else {
                v1.push_back(n);
            }
        }
        vector<int> res;
        for (int n : v1) {
            res.push_back(n);
        }
        for (int n : v2) {
            res.push_back(n);
        }
        return res;
    }
};
int main() {
    return 0;
}
